package com.l024.loanthief.utils;

import android.provider.Settings;

import com.l024.loanthief.entity.DeviceEntity;
import com.l024.loanthief.help.AppHelp;

/**
 * @author wu_ming_zhi_bei
 * @date 2021/1/19 13:59
 * @Notes
 */
public class DeviceUtil {

    /**
     * 获取设备信息
     * @return
     */
    public DeviceEntity getDeviceInfo(){
        DeviceEntity deviceEntity = new DeviceEntity();
        String phoneName = Settings.Secure.getString(AppHelp.getInstance().getContext().getContentResolver(), "bluetooth_name");
        deviceEntity.setIp(ScanDeviceTool.getHostIP());
        deviceEntity.setPhoneName(phoneName);
        return deviceEntity;
    }
}
